package com.zhuxulin.nokia;

import java.util.Vector;

public class StringUtils {
	public static String[] split(String util, String split) {
		String[] splits = null;
		Vector vector = new Vector();
		int startIndex = 0;
		int index = 0;
		startIndex = util.indexOf(split);

		while (((startIndex < util.length() ? 1 : 0) & (startIndex != -1 ? 1 : 0)) != 0) {
			String temp = util.substring(index, startIndex);
			vector.addElement(temp);

			index = startIndex + split.length();

			startIndex = util.indexOf(split, startIndex + split.length());
		}

		vector.addElement(util.substring(index + 1 - split.length()));

		splits = new String[vector.size()];
		for (int i = 0; i < splits.length; i++) {
			splits[i] = ((String) vector.elementAt(i));
		}

		return splits;
	}
}